package com.example.androidtest1.dialog;

import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;

import com.example.androidtest1.R;

public class MyDialog extends AlertDialog {
    public EditText dialog_et =null;
    public String result ="";
    public MyDialog(@NonNull Context context) {
        super(context);

    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dialog_layout);
        dialog_et =findViewById(R.id.dialog_et1);

    }
    public String getResult(){
        return dialog_et.getText().toString();
    }
}
